<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./jq-3.6.0.js"></script>
    <style>
        .box {
            height: 100px;
            width: 50px;
            background-color: red;
            overflow: auto;
        }
    </style>
</head>

<body>
    <div class="box">小琴最美小琴最美小琴最美小琴最美小琴最美小琴最美小琴最美小琴最美小琴最美小琴最美小琴最美小琴最美小琴最美小琴最美</div>
</body>
<script>
    $('.box').scroll(function() {
        console.log($(this).scrollTop());
    })
    $('.box').click(function() {
        $(this).scrollTop(0)
    })
</script>

</html>